/*
 * @Author: szx
 * @Date: 2022-05-21 14:13:10
 * @LastEditTime: 2022-05-21 14:18:30
 * @Description:
 * @FilePath: \leetcode\面试题\05\06\06.js
 */
/**
 * @param {number} A
 * @param {number} B
 * @return {number}
 */
var convertInteger = function (A, B) {
    let res = 0;
    for (let i = 0; i < 32; i++) {
        const a = (A >> i) & 1,
            b = (B >> i) & 1;
        if (a != b) res++;
    }
    return res;
};
